﻿using MiniErp.Entity.DataStreams.BOs;
using MiniErp.Entity.DataStreams.DOs;
using MiniErp.Entity.DataStreams.DTOs;
using MiniErp.Entity.DataStreams.DTOs.Users;
using MiniErp.Entity.JWTs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniErp.Service.BusinessService.IService
{
    /// <summary>
    /// mini erp 登录注册服务层
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="uid">工号</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
         Task<UserDTO> Login(int uid, string password);

        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="registers">用户注册信息</param>
        /// <returns></returns>
         Task<bool> Register(RegisterDTO registers);


        /// <summary>
        /// 从Mysql获取岗位权限
        /// </summary>
        /// <param name="uid">工号</param>
        /// <returns></returns>
         Task<List<CacheUserRights>> GetUserRightByMysql(int uid);

        /// <summary>
        /// 获取用户打卡信息  定制服务
        /// </summary>
        /// <param name="uid">工号</param>
        /// <param name="day">查询天数</param>
         List<string> GetUserPunchInfo(int uid);


    }
}
